<%--
  Created by IntelliJ IDEA.
  User: 叶叶
  Date: 2022/2/20
  Time: 20:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>内部审核</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.15.3/dist/bootstrap-table.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <script src="https://unpkg.com/bootstrap-table@1.15.3/dist/bootstrap-table.min.js"></script>
    <script src="../js/bootstrap-table-zh-CN.min.js"></script>
</head>
<body>
<div class="container" id="div1">
    <span style="color: blue;font-family: 华文宋体"><marquee width=400 direction=left align=middle><span>您正在做的业务是：生产管理--内部生产管理--生产登记（ 责任人控制）
</span></marquee></span>
    <!--      <div class="row" style="margin-top: 20px">-->
    <!--          <div class="col-10">-->
    <!--          </div>-->
    <!--          <div class="col-2">-->
    <!--              <button class="btn btn-primary" data-toggle="modal" data-target="#myModal" onclick="add1()">添加</button>-->
    <!--          </div>-->
    <!--      </div>-->
    <div class="container">
        <div class="row">
            <caption>
                <div style="float: right;margin-bottom: 5px">
                </div>
            </caption>
            <table id="table" class="table table-hover table-bordered" style="width: 1100px">
                <thead>


                </thead>
                <tbody>

            </table>
        </div>
    </div>
</div>
<DIV class=DIV_STYLE2 style="display: none" id="div2"><TABLE cellSpacing=0 cellPadding=0 width=1000 align=center bgColor=#ffffff border=0>
    <TBODY>
    <TR>
        <TD class=TABLE_STYLE6 vAlign=bottom rowSpan=2 align=center>
            <TABLE style="BORDER-TOP: #333333 1px solid; BORDER-RIGHT: #333333 1px solid; BORDER-BOTTOM: #333333 1px solid; BORDER-LEFT: #333333 1px solid" cellSpacing=0 cellPadding=0 width="100%" border=0>
                <TBODY>
                <TR>
                    <TD height=10 colSpan=4>
                        <TABLE width=1000>
                            <TBODY>
                            <TR>
                                <TD>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE5 height=5 align=center>&nbsp;</TD></TR></TBODY></TABLE>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE5 height=5 align=center><FONT size=4><B>生产派工单</B></FONT></TD></TR></TBODY></TABLE>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE5 height=5 align=center>&nbsp;</TD></TR></TBODY></TABLE>
                                    <TABLE id=theObjTable class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>派工单编号：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left><span id="pgd"></span>&nbsp;</TD>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="16%" borderColorDark=#eeeeee align=right>出库单编号：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left>&nbsp<span id="ckd"></span></TD></TR>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>产品编号：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left><span id="cpbh"></span>&nbsp;</TD>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>产品名称：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left><span id="cpmc"></span>&nbsp;</TD></TR>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>描述&nbsp;&nbsp;&nbsp;&nbsp;：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left>&nbsp<span id="ms"></span></TD>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>数量&nbsp;&nbsp;&nbsp;&nbsp;：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left><span id="sl"></span>&nbsp;</TD></TR></TBODY></TABLE>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE5 height=5 align=center>&nbsp;</TD></TR></TBODY></TABLE>
                                    <TABLE id="table2" class=TABLE_STYLE5  borderColor=#000000 cellSpacing=0 borderColorDark=#eeeeee cellPadding=0 align=center borderColorLight=#848284 border=1>
                                        <TBODY>
                                        <TR class=TR_STYLE2 height=20 bgColor=#d2e9ff>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="8%" align=left>工序名称</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="11%" align=left>设计工时数</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="11%" align=left>实际工时数</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="13%" align=left>设计工时成本(元)</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="11%" align=left>实际工时成本</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="13%" align=left>设计物料成本(元)</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="11%" align=left>实际物料成本</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="7%" align=left>工序登记</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="7%" align=left>&nbsp;</TD></TR>




                                        </TBODY></TABLE>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE5 height=5 align=center>&nbsp;</TD></TR></TBODY></TABLE>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>设计工时总成本：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left><span id="sjcb"></span>&nbsp;</TD>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="16%" borderColorDark=#eeeeee align=right>设计物料总成本：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left><span id="sjwlcb"></span>&nbsp;</TD></TR>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>实际工时总成本：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left>0.00&nbsp;</TD>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="16%" borderColorDark=#eeeeee align=right>实际物料总成本：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left>0.00&nbsp;</TD></TR>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>登记人&nbsp;&nbsp;：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left><span id="djr"></span>&nbsp;</TD>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>登记时间：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left><span id="djsj"></span>&nbsp;</TD></TR>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>复核人&nbsp;&nbsp;：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left>newer&nbsp;</TD>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>复核时间：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="37%" align=left>2022-02-20 21:49:54.0&nbsp;</TD></TR>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="13%" borderColorDark=#eeeeee align=right>备注&nbsp;&nbsp;&nbsp;&nbsp;：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="87%" colSpan=3 align=left><span id="bz"></span>&nbsp;</TEXTAREA> </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
                <TR>
                    <TD width=56 colSpan=3 noWrap></TD></TD></TR>
                <TR>
                    <TD height=100 colSpan=3 noWrap></TD>
                    <TD></TD></TR>
                <TR vAlign=bottom>
                    <TD colSpan=4 noWrap align=center></TD></TR></TD>
                <TR>
                    <TD colSpan=4 noWrap align=right></TD></TR></TBODY></TABLE></TD>
        <TD bgColor=#ffffff height=2 width=1></TD>
        <TD bgColor=#ffffff height=2 width=1></TD>
        <TD bgColor=#ffffff height=2 width=1></TD></TR>
    <TR>
        <TD bgColor=#333333 height=120 width=1></TD>
        <TD bgColor=#666666 height=120 width=1></TD>
        <TD bgColor=#999999 height=120 width=1></TD></TR>
    <TR align=right vAlign=top>
        <TD colSpan=4>
            <TABLE class=TABLE_STYLE6 cellSpacing=0 cellPadding=0 align=center border=0>
                <TBODY>
                <TR>
                    <TD bgColor=#333333 height=1></TD></TR>
                <TR>
                    <TD bgColor=#666666 height=1></TD></TR>
                <TR>
                    <TD bgColor=#999999 height=1></TD></TR></TBODY></TABLE></TD></TR>
    <TR align=right vAlign=middle>
        <TD colSpan=4></TD></TR></TBODY></TABLE></DIV>
<DIV class=DIV_STYLE2 id="div3" style="display: none"><TABLE cellSpacing=0 cellPadding=0 width=350 align=center bgColor=#ffffff border=0>
    <div style="position: relative;left: 60%">
        <input  onclick="tijiao11()" class="btn3_mouseout" type=button value=提交>
        <input  onclick="fanhui()" class="btn3_mouseout" type=button value=返回 id="fh">
    </div>
    <TBODY>
    <TR>
        <TD class=TABLE_STYLE6 vAlign=bottom rowSpan=2 align=center>
            <TABLE style="BORDER-TOP: #333333 1px solid; BORDER-RIGHT: #333333 1px solid; BORDER-BOTTOM: #333333 1px solid; BORDER-LEFT: #333333 1px solid" cellSpacing=0 cellPadding=0 width=1000 border=0>
                <TBODY>
                <TR>
                    <TD height=10 colSpan=4>
                        <TABLE width=1000>
                            <TBODY>
                            <TR>
                                <TD>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE5 height=5 align=center>&nbsp;</TD></TR></TBODY></TABLE>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE5 height=5 align=center><FONT size=4><B>生产登记单</B></FONT></TD></TR></TBODY></TABLE>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE5 height=5 align=center>&nbsp;</TD></TR></TBODY></TABLE>
                                    <TABLE id=theObjTable class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="10%" borderColorDark=#eeeeee align=right>派工单编号：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="40%" align=left><span id="pgbh"></span></TD>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="10%" borderColorDark=#eeeeee align=right>工序名称：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="40%" align=left><span id="gxmc"></span></TD></TR>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="10%" borderColorDark=#eeeeee align=right>负责人&nbsp;&nbsp;：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="40%" align=left><INPUT class=INPUT_STYLE3 id="fzr" value="" name=procedure_responsible_person></TD>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="10%" borderColorDark=#eeeeee align=right>设计工时数：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="40%" align=left><span id="sjgss"></span>&nbsp;</TD></TR>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="10%" borderColorDark=#eeeeee align=right>已用工时数：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="40%" align=left><INPUT type=hidden value=0.00 name=real_labour_hour_amount>0.0&nbsp;</TD>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="10%" borderColorDark=#eeeeee align=right>本次工时数：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="40%" align=left><INPUT class=INPUT_STYLE3 id="bcgss" name=labour_hour_amount></TD></TR></TBODY></TABLE>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE5 height=5 align=center>&nbsp;</TD></TR></TBODY></TABLE>
                                    <TABLE id="table3" class=TABLE_STYLE5 borderColor=#000000 cellSpacing=0 borderColorDark=#eeeeee cellPadding=0 align=center borderColorLight=#848284 border=1>
                                        <TBODY>
                                        <TR class=TR_STYLE2 height=20 bgColor=#d2e9ff>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="5%" align=left>序号</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="13%" align=left>物料名称</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="11%" align=left>物料编号</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="13%" align=left>设计数量</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="11%" align=left>补充数量</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="13%" align=left>已使用数量</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="11%" align=left>本次数量 </TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="13%" align=left>&nbsp;</TD></TR>




                                        </TBODY></TABLE>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE5 height=5 align=center>&nbsp;</TD></TR></TBODY></TABLE>
                                    <TABLE class=TABLE_STYLE4 align=center>
                                        <TBODY>
                                        <TR class=TR_STYLE1 height=20>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="10%" borderColorDark=#eeeeee align=right>复核人&nbsp;&nbsp;：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="40%" align=left><INPUT class=INPUT_STYLE3 value="" id="djr1" name=register></TD>
                                            <TD class=TD_STYLE8 borderColorLight=#848284 width="10%" borderColorDark=#eeeeee align=right>复核时间：</TD>
                                            <TD class=TD_STYLE2 borderColor=#dedbd6 width="40%" align=left><span id="djsj1"></span></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
                <TR>
                    <TD width=56 colSpan=3 noWrap></TD></TD></TR>
                <TR>
                    <TD height=100 colSpan=3 noWrap></TD>
                    <TD></TD></TR>
                <TR vAlign=bottom>
                    <TD colSpan=4 noWrap align=center></TD></TR></TD>
                <TR>
                    <TD colSpan=4 noWrap align=right></TD></TR></TBODY></TABLE></TD>
        <TD bgColor=#ffffff height=2 width=1></TD>
        <TD bgColor=#ffffff height=2 width=1></TD>
        <TD bgColor=#ffffff height=2 width=1></TD></TR>
    <TR>
        <TD bgColor=#333333 height=120 width=1></TD>
        <TD bgColor=#666666 height=120 width=1></TD>
        <TD bgColor=#999999 height=120 width=1></TD></TR>
    <TR align=right vAlign=top>
        <TD colSpan=4>
            <TABLE class=TABLE_STYLE6 cellSpacing=0 cellPadding=0 align=center border=0>
                <TBODY>
                <TR>
                    <TD bgColor=#333333 height=1></TD></TR>
                <TR>
                    <TD bgColor=#666666 height=1></TD></TR>
                <TR>
                    <TD bgColor=#999999 height=1></TD></TR></TBODY></TABLE></TD></TR>
    <TR align=right vAlign=middle>
        <TD colSpan=4></TD></TR></TBODY></TABLE></DIV>
<script>
    $(function () {
        $("#table").bootstrapTable({
            method:"post",
            contentType:"application/json",
            url:"/cha/fh1",
            //初始页数
            pageNumber:1,
            pagination: true,
            sidePagination:"server",
            pageSize:2,
            pageList:[2,4,6,8,10],
            queryParams:function (param) {
                return {
                    page: (param.offset / param.limit) + 1,
                    pageNum: param.limit,
                }
            },
            columns:[
                {title:"生产派工单编号",field:"manufactureId",align:"center"},
                {title:"产品编号",field:"productId",align:"center"},
                {title:"产品名称",field:"productName",align:"center"},
                {title:"数量",field:"amount",align:"center"},
                {title:"出库单编号集合",field:"",align:"center"},
                {title:"登记时间",field:"registerTime",align:"center"},
                {title:"登记",field:"",align:"center", formatter:function (value, row, index) {
                        var btn2 = "<button class='btn btn-info'  onclick='fuhe("+JSON.stringify(row)+")'>复核</button>";
                        return btn2;
                    }}
            ]
        })

    })
    function fuhe(row) {
        let manufactureId = row.manufactureId;
        document.getElementById("div1").style.display='none'
        document.getElementById("div2").style.display='block'
        $.ajax({
            type:"get",
            url: "/cha/fhdj/"+manufactureId,
            dataType:"json",
            success:function (data) {
                document.getElementById("pgd").innerText=data.manufactureId;
                document.getElementById("cpbh").innerText=data.productId;
                document.getElementById("cpmc").innerText=data.productName;
                document.getElementById("sl").innerText=data.amount;
                document.getElementById("ms").innerText=data.productDescribe;
                document.getElementById("sjcb").innerText=data.labourCostPriceSum
                document.getElementById("sjwlcb").innerText=data.moduleCostPriceSum;
                document.getElementById("djr").innerText=data.register;
                document.getElementById("djsj").innerText=data.registerTime;
                document.getElementById("bz").innerText=data.remark;
                chafhgx()
            }
        })
    }
    function chafhgx() {
        let productId = document.getElementById("cpbh").innerText;
        $.ajax({
            type:"get",
            url:"/cha/chafhgx/"+productId,
            dataType: "json",
            success:function (data) {
                for (var i = 0; i < data.length; i++) {
                    document.getElementById("table2").innerHTML +=
                        "<tr>" +
                        "<td class='mc'>" + data[i].procedureName + "</td>" +
                        "<td>" + data[i].labourHourAmount + "</td>" +
                        "<td>" + (data[i].realLabourHourAmount != null ? data[i].realLabourHourAmount : "0.00") + "</td>" +
                        "<td class='gsxj'>" + data[i].subtotal + "</td>" +
                        "<td>" + (data[i].realSubtotal != null ? data[i].realSubtotal : "0.00") + "</td>" +
                        "<td>" + data[i].moduleSubtotal + "</td>" +
                        "<td>" + (data[i].realModuleSubtotal != null ? data[i].realModuleSubtotal : "0.00") + "</td>" +
                        "<td><a href='#' onclick='fh(" + data[i].detailsInt + "," + data[i].labourHourAmount + "," + data[i].subtotal + ")'>" + (data[i].procedureFinishTag == 'G004-2' ? "复核" : (data[i].procedureFinishTag == 'G004-1' ? "完成" : (data[i].procedureFinishTag == 'G004-3' ? "已审核" : ""))) + "</a></td>" +
                        "<td class='xb'>" + (data[i].procedureTransferTag == 'G005-0' ? "<a href='#'></a>" : (data[i].procedureTransferTag == 'G005-1' ? "<a href='#' onclick='jjfh(" + data[i].detailsInt + ")'>交接复核</a>" : (data[i].procedureTransferTag == "" ? "<a href='#'></a>" : "已完成"))) + "</td>" +
                        "</tr>"
                }
            }
        })
    }
    function fh(sz,sjs,cb) {
        document.getElementById("pgbh").innerText=document.getElementById("pgd").innerText;
        document.getElementById("djr1").value=document.getElementById("djr").innerText;
        document.getElementById("djsj1").innerText=document.getElementById("djsj").innerText
        document.getElementById("div1").style.display='none'
        document.getElementById("div2").style.display='none'
        document.getElementById("div3").style.display='block'
        let parentId = document.getElementById("cpbh").innerText;
        $.getJSON("http://localhost:8080/cha/djc",{detailsInt:sz,parentId:parentId},function (data) {
            console.log(data)
            for (var i=0;i<data.length;i++){
                document.getElementById("gxmc").innerText=data[0].procedureName;
                document.getElementById("sjgss").innerText=data[0].labourHourAmount;
                // document.getElementById("fzr").value=data[0].procedureResponsiblePerson;
                var xx = data[i].mProcedureModules;
                for (var j=0;j<xx.length;j++){
                    document.getElementById("table3").innerHTML+="<tr>"+
                        "<td class='x1'>"+xx[j].detailsInt+"</td>"+
                        "<td>"+xx[j].productName+"</td>"+
                        "<td>"+xx[j].productId+"</td>"+
                        "<td>"+xx[j].amount+"</td>"+
                        "<td class='xx'>"+xx[j].costPrice+"</td>"+
                        "<td>0.00</td>"+
                        "<td><input type='text' class='ss'/></td>"+
                        "<td><input type='hidden' value='"+xx[j].parentId+"'></td>"+
                        "</tr>"
                }
            }
        })
        $.getJSON("http://localhost:8080/cha/fuhecha",{detailsInt:sz,parentId:parentId},function (data) {
            document.getElementById("fzr").value=data[0].procedureResponsiblePerson;
            document.getElementById("bcgss").value=data[0].labourHourAmount;
            for (var i=0;i<data.length;i++) {
                var xx = data[i].mProcedureModulings;
                for (var j = 0; j < xx.length; j++) {

                    $(".ss").html(xx[j])
                    let nodeListOf = document.getElementById("table3").querySelectorAll("tr");
                    for (var i = 0; i < nodeListOf.length; i++) {
                        let nodeListOf1 = nodeListOf[i + 1].querySelectorAll("td");
                        //产品编号
                        let productId = document.getElementById("cpbh").innerText;
                        //物料编号
                        let innerText = nodeListOf1[nodeListOf.length].innerText;
                        console.log(innerText)
                        //本工序物料序号
                        let detailsInt = nodeListOf1[nodeListOf.length - 2].innerText;
                        console.log(detailsInt)
                        //物料名称
                        let productName = nodeListOf1[nodeListOf.length - 1].innerText;
                        console.log(productName)
                        //设计数量
                        let detailsInt1 = nodeListOf1[nodeListOf.length + 1].innerText;
                        console.log(detailsInt)
                        //本次使用数量
                        let amount = nodeListOf1[nodeListOf.length + 4].querySelectorAll("input")[0].value=xx[j].amount;
                        console.log(amount)
                        let parentId = nodeListOf1[nodeListOf.length + 5].querySelectorAll("input")[0].value;
                        console.log(parentId)
                    }
              }
             }
        })
    }
    function tijiao11() {
        let detailsInt = $(".x1").html()
        let productId = document.getElementById("cpbh").innerText;
        var  xx1={
            detailsInt:detailsInt,
            parentId:productId,
        }
        let s = JSON.stringify(xx1);
        $.ajax({
            type:"post",
            dataType:"json",
            url:"/cha/fhtg/",
            contentType: "application/json",
            data:s,
            success:function (data) {
                document.location="Internalaudit.jsp"
            }
        })
    }
    function jjfh(detailsInt) {
        let detailsInt1 = detailsInt;
        let productId = document.getElementById("cpbh").innerText;
        let manufactureId = document.getElementById("pgd").innerText;
        $.post("http://localhost:8080/cha/gxslfh",{detailsInt:detailsInt1,parentId:productId},function (data) {
            let xb = document.getElementsByClassName("xb");
            if (xb[2].innerText != '交接复核') {
                console.log(xb[2].innerText)
                document.location = "Internalaudit.jsp"
            } else {
                $.ajax({
                    type: "post",
                    url: "/cha/xgzt/" + manufactureId,
                    data: "json",
                    success: function (data) {
                        document.location = "Internalproduction.jsp"
                    }
                })
            }


        })
    }
</script>
</body>
</html>
